//
//  StatusFrame.m
//  Weibo
//
//  Created by Anasue on 9/16/15.
//  Copyright (c) 2015 Anasue. All rights reserved.
//

#import "StatusFrame.h"
#import "Status.h"
#import "StatusDetailViewFrame.h"

@implementation StatusFrame

- (void)setStatus:(Status *)status
{
    _status = status;
    
    //微博的frame
    [self setupStatusFrame];
    //底部工具条的frame
    [self setupToolBarFrame];
    
    self.cellHeight = CGRectGetMaxY(self.toolBarFrame);
}

- (void)setupStatusFrame
{
    StatusDetailViewFrame * detailViewFrame = [[StatusDetailViewFrame alloc]init];
    detailViewFrame.status = self.status;
    self.detailViewFrame = detailViewFrame;
}

- (void)setupToolBarFrame
{
    CGFloat x = 0;
    CGFloat y = CGRectGetMaxY(self.detailViewFrame.frame);
    CGFloat w = ScreenW;
    CGFloat h = 35;
    self.toolBarFrame = CGRectMake(x, y, w, h);
    
}

@end
